记录一次前端input中的值为什么在后端取不到值

2023-08-09sad creeper

前端源码:

<input type="text" name="user" placeholder="请输入你的名字" class="layui-input" value="{{ username}}" size="50" disabled="true">

后端源码:

send_name = request.POST.get('user')

这里取到的值为None

原因:

在HTML中,`disabled="true"` 是用来禁用输入字段的属性。当设置为 `disabled="true"` 时,用户无法在该输入字段中进行编辑或输入,也无法将该字段的值提交到后端。

因此,当你的输入字段被禁用时,后端代码 `request.POST.get('user')` 将无法获取该字段的值,因为禁用的字段不会被包含在提交的表单数据中。

如果你想在后端取到这个值,前端又需要禁止用户输入,怎么解决呢?

可以使用 `readonly` 属性来替代 `disabled` 属性。

代码如下:

<input type="text" name="user" placeholder="请输入你的名字" class="layui-input" value="{{ username }}" size="50" readonly>

阅读 1562 评论


T

Teds Woodworking Reviews

2小时前 ·


1

1gom

It's remarkable to visit this web page and reading the views of all mates regarding this post, while I am also zealous of getting know-how.

3小时前 ·


C

Custom Deck Builder Nixa

WOW just what I was looking for. Came here by searching for Custom Decks

6小时前 ·


l

lumi777

This is really interesting, You are a very skilled blogger. I have joined your feed and look forward to seeking more of your fantastic post. Also, I have shared your web site in my social networks!

8小时前 ·


G

Go Here

It's remarkable to go to see this website and reading the views of all friends regarding this post, while I am also zealous of getting familiarity.

8小时前 ·


L

Lotto Champ Reviews

10小时前 ·


c

concise expression

Hi terrific blog! Does running a blog such as this take a massive amount work? I have absolutely no expertise in programming but I had been hoping to start my own blog soon. Anyhow, should you have any ideas or techniques for new blog owners please share. I understand this is off topic however I simply had to ask. Cheers!

12小时前 ·


T

Trezik Forge GPT

This is very interesting, You're an excessively professional blogger. I've joined your feed and look forward to searching for more of your fantastic post. Additionally, I've shared your web site in my social networks

12小时前 ·


n

newspanishhomes.com

treasure island casino las vegas

13小时前 ·


R

Ryberik Link App

The other day, while I was at work, my cousin stole my iPad and tested to see if it can survive a twenty five foot drop, just so she can be a youtube sensation. My iPad is now destroyed and she has 83 views. I know this is totally off topic but I had to share it with someone!

13小时前 ·


A

Adelaide

Ι every time used to study paragraph іn news papers Ьut noѡ as I am a ᥙѕeг of internet so from now I am usіng net for posts, tһanks to web.

15小时前 ·


f

free credit no deposit

I am truly grateful to the owner of this web page who has shared this fantastic article at at this place.

15小时前 ·


S

Steroids for

is there a safe way to take steroids

17小时前 ·


w

wetter manipulation

Since the admin of this site is working, no doubt very rapidly it will be well-known, due to its feature contents.

18小时前 ·


คาสิโนออนไลน์

Hello there! This blog post could not be written any better! Looking through this post reminds me of my previous roommate! He constantly kept talking about this. I will forward this information to him. Pretty sure he'll have a good read. Many thanks for sharing!

20小时前 ·


b

buy twitter followers

Today, I went to the beachfront with my kids. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is completely off topic but I had to tell someone!

21小时前 ·


s

seo

Thanks for some other informative web site. Where else may just I am getting that type of info written in such an ideal way? I've a venture that I'm just now operating on, and I have been on the glance out for such info.

1天前 ·


I

Infosplus.Org

ville de richelieu

1天前 ·


คาสิโนออนไลน์เว็บตรง

This is my first time visit at here and i am really happy to read all at alone place.

1天前 ·


b

blackcoin.co

The variant presents the most effective home edge for gamers and if they're acquainted with a fundamental blackjack technique, they're able to play. Since it is performed with one deck, naturally, Single Deck Blackjack has a lower house edge in comparison with the other variants. In fact, generally speaking, it's the only on line casino sport with the lowest home edge within the industry. Microgaming’s Single Deck Blackjack as an example is performed with one deck and the dealer always hits on gentle 17. Players can double if they have 9, 10 or 11 and doubling after splitting isn't allowed. The house edge of the sport is zero.31%, due to this fact, the percentages favor the participant more than the other video games. This is followed by a $50 Tuesday reload bonus you'll have the ability to claim 3 times over 24 hours, and a $250 reload bonus that you can grab every Wednesday. You can play VIP live blackjack, where the table restrict is about at $50,000, and revel in excessive withdrawal limits. If you turn out to be a VIP via their MySlots Rewards Program, you’ll be capable of raise your withdrawal limits much more. If we got here throughout any immediate red flags, corresponding to a scarcity of reputable and/or recognizable payment methods, the net casino in question was eradicated from the method. Before whittling down our lists, we made certain that every potential online casino candidate was licensed appropriately and that its website was made secure by SSL encryption. Instantly play your favourite free online video games including card games, puzzles, brain games & dozens of others, delivered to you by Washington Publish. In addition, utilizing a chart may be thought-about dishonest by some casinos. Selecting whether to hit or stand is decided by a number of factors, together with the dealer’s upcard. For occasion, if the supplier has a 10-value card, you should stand on anything 17 or higher. However, if the vendor has a 4, five, or six, you need to stand on something 12 or greater. To ensure you perceive how our specialists arrived at our high picks for on-line blackjack casinos, we’ll define precisely how our evaluation course of works. When planning the proper technique using a chart, use a single-deck-specific chart. Although multi-deck and single-deck video games don’t seem to vary much, not all multi-deck methods can play properly towards single-deck video games. To play blackjack with one deck, you really don’t have to be taught new guidelines or burden your self with complicated methods. As A Substitute, you solely need a rudimentary knowledge of primary blackjack guidelines, with several slight additions that include the one deck setting. One Other current addition to the on line casino's offerings is Rolling Stack Blackjack, that includes a profitable facet guess. Also, don’t neglect to take a look at Match Blackjack for a taste of competitors. Next, we now have Wild Casino, which is your go-to place if you need to exhibit your blackjack abilities to others and beat them. The Wizard endorses these three casinos to play blackjack for actual money. Split pairs extra aggressively - specifically 2s, 3s, and 7s towards vendor's 2-7. Double down opportunities expand, particularly on onerous 9 against supplier's 5 or 6. At its highest level, professional blackjack gamers beat the game by counting cards, raising their bets as quickly as the playing cards left within the deck are predominantly greater. Conversely, they wager the minimal or depart the table when most of the playing cards left are decrease in worth. Land-based and on-line casinos will often make some extent of advertising their single-deck titles. Nevertheless, before you start enjoying, ensure to read over all the rules imposed, which finally may increase the home edge significantly and offset the single deck’s attractive odds. Typically, these guidelines can really make the house edge larger in a single-deck sport than a six to eight deck model. We'd additionally counsel the blackjack library at PokerStars On Line Casino who operate in all legalized playing states bar WV. Not only does their commonplace blackjack recreation provide a perfect opportunity to apply your technique, but the PokerStars web site also presents numerous 'How to Play' guides. Additionally, we wish to level out that with the vendor peeking for blackjack, technique will get easier.

3天前 ·


b

blackout

High Roller Las Vegas tickets are valid for a single use and you'll go to as much as three days from the date you choose at the time of reserving. Many third-party websites provide great offers and discount packages, so it’s a matter of discovering the right one for you. However, ticket costs could improve throughout weekends or holidays because of high demand, and blackout dates could apply. There is all the time a line for tickets at the Vegas Excessive Roller, particularly on the weekends. Nonetheless, you can cut back this time when you e-book ahead, as it permits you to skip the ticket line altogether. Go Go Bingo will even spotlight potential profitable combinations that you're one number away from hitting. This is often a big help when you are deciding to purchase an extra ball or not. The workers does an excellent job of shuffling the earlier riders off previous to the new group moving into the pod, nevertheless. Driving the Las Vegas Excessive Roller is decided by favorable weather situations. If your ride is canceled because of unhealthy climate, you possibly can reschedule for an additional date or obtain a full refund. At its worst, nevertheless, I nonetheless wouldn’t anticipate the Excessive Roller wait times to be greater than about minutes. Even though the wheel spins slowly, the line typically moves fairly quick. Excessive curler slots are nice for gamers with massive bankrolls who want the thrill of chasing the biggest jackpots. Whether you play VIP slots in a brick-and-mortar on line casino or an online site, you’ll have access to the games with the most effective odds in the house. You’ll also construct up one of the best comps, rewards, and cashback at the institution. The Excessive Roller is a world-renowned observation wheel positioned on the LINQ Promenade in Las Vegas, Nevada. The spectacular menu features meals and drinks primarily based on most of the legendary authentic exhibits and flicks you’ve probably binged in a day or two. Let’s start this list with one of the recognizable excursions on The Strip. On average weekdays there might not be a line in any respect to purchase tickets, and you could be boarding a pod in a matter of minutes. The finest time to ride the High Curler is at night time because the view is fantastic in the dark. So if your journey budget allows, I can’t consider a greater place to stay for a lavish experience! Centrally positioned within the heart of the Strip, you’ll find a number of eating places and bars, 5 pools, a spa, a huge casino, and amenities to make you're feeling like royalty. The pleased half hour is expensive – Again, until you’re pounding drinks, the pleased half-hour is pretty dang expensive. $82 USD can get you fairly far in Vegas, so you’ll wish to make sure to get your money’s worth. The different ticket choice remains to be one rotation, but with no bar onboard. We didn’t do this one, but when you’re with household otherwise you need a more laid-back expertise, I suggest you guide this general ticket possibility as a substitute for $34 USD. Each provide the identical fantastic views, however one has free booze and the opposite doesn’t. I guess on the upside, the brief period makes it easy to suit into the evening. Located at The LINQ Hotel, the High Curler is the world’s largest rotating observation wheel offering the most effective views of Las Vegas. I’ve carried out the happy half-hour twice at this point and was impressed with the efficiency demonstrated by the bartender and the worth I acquired. You can match a lot of drinks into your gullet over 30 minutes… belief me. While there’s a ticket counter on the base of the High Curler, it can save you a considerable period of time (and usually a few bucks) by reserving in advance on-line. Plus, whenever you keep at The LINQ, you can most likely get money taken off your ticket. These who stayed at the hotel have reported getting $12 off when purchasing over $15 worth of items on the store. This distinction of times provides you two distinct adventures when taking the huge spin. You can overlook the good thing about the Las Vegas Strip from excessive atop the LINQ Excessive Roller during the daylight or soak within the neon lights within the night. The two contrasting factors of view completely encapsulate the Vegas experience. Not solely do you get a experience that outlasts many others, however you get to get pleasure from it in fashion and comfort. Lots of room in each pod – Each pod can maintain as a lot as 40 individuals, but even then there’s nonetheless loads of room for everyone. Climate-controlled – Vegas could be extremely sizzling properly into the evening, especially if you’re strolling in all places. The truth that every pod is climate-controlled is a giant plus in my guide. Only Ferris Wheel in Las Vegas – Yep, this is actually a one-of-a-kind experience in Vegas! In The End, I just wish to assist folks plan a greater journey and save a couple of dollars within the course of. If knocking back a few drinks during your experience is appealing, I recommend upgrading to the Excessive Roller’s Pleased Half-Hour package deal vs. the standard ride I documented above. While crowds were common when the Excessive Roller was new, it’s becoming extra of a walk-up and walk-on attraction as time goes by. The hottest option and the one we did was the one rotation with all-you-can-drink happy hour, and sure, they make very robust drinks! We liked it because drinking in Vegas may be spendy, however when you start your night on this, you will get a strong buzz for cheap. A ticket prices only $82 USD and from the moment you get into the pod, the bartender is making drinks for you the whole time. Families visiting the High Curler can get pleasure from important financial savings on children’s tickets. For daytime tickets, kids aged four to 12 pay just $16, saving $22 in comparison with the adult price of $38. Similarly, for anytime tickets, children’s tickets price $26, offering a $24 discount off the grownup worth of $50. Nevertheless, Excessive Curler doesn’t supply reductions for seniors or college students. You can study more concerning the High Curler by clicking right here, but here are the fundamental particulars... The Excessive Roller is the most important observation wheel in North America. It sits in the heart of the Las Vegas Strip as part of The Linq Promenade.

1周前 ·


d

do i need a doctor prescription to buy priligy

Right here is the perfect webpage for anyone who would like to find out about this topic. You understand a whole lot its almost tough to argue with you (not that I personally will need to…HaHa). You certainly put a brand new spin on a subject that's been discussed for ages. Wonderful stuff, just great!

8个月前 ·